---
layout: default
redirect_from:
  - /archive/
  - /archive
  - /archive/1/
  - /archive/1
---

{% unless paginator.previous_page %}
  {% comment %}
    Newest posts in a unique, Medium-like layout on the first page
  {% endcomment %}
  <section class="latest">
    {% assign post=paginator.posts.first %}
    {% include featured.html post=post %}

    {% assign post=paginator.posts[1] %}
    {% include featured.html post=post %}

    {% assign post=paginator.posts[2] %}
    {% include featured.html post=post %}

    {% assign post=paginator.posts[3] %}
    {% include featured.html post=post %}
  </section>
{% endunless %}

<section class="more">
{% if paginator.previous_page %}
  <h2>第 {{ paginator.page }} 页</h2>
  {% for post in paginator.posts %}
    {% unless post.hidden %}
      {% include featured.html post=post %}
    {% endunless %}
  {% endfor %}
{% else %}
  <h2>更多内容</h2>
  {% for post in paginator.posts offset: 4 %}
    {% unless post.hidden %}
      {% include featured.html post=post %}
    {% endunless %}
  {% endfor %}
{% endif %}
</section>

<nav class="pagination">
  {% if paginator.previous_page == 1 %}
    <a href="/" class="previous">上一页</a>
  {% endif %}

  {% if paginator.previous_page != 1 and paginator.previous_page %}
    <a href="/archive/{{ paginator.previous_page }}" class="previous">上一页</a>
  {% endif %}

  {% if paginator.next_page %}
    <a href="/archive/{{ paginator.next_page }}" class="next">下一页</a>
  {% endif %}
</nav>

